

        <g:set var="entityName" value="${message(code: 'article.label', default: 'Article')}" />
            <g:form method="post" >
                <g:hiddenField name="id" value="${articleInstance?.id}" />
                <g:hiddenField name="version" value="${articleInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="title"><g:message code="article.title.label" default="Title" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: articleInstance, field: 'title', 'errors')}">
                                    <g:textField name="title" maxlength="250" value="${articleInstance?.title}" />
                                </td>
                            </tr>
                         

                            <tr class="prop">
                                <td valign="top" class="name">
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: articleInstance, field: 'content', 'errors')}">
 <a href="javascript:" id="sharedcheckbox" >共享这个文档给其他人</a>
 <input type="hidden" name="isShared" id="isShared" value="${articleInstance?.shared?.isEmpty()?'false':'true'}">
                                </td>
                            </tr>
                            <tr class="prop hide" id="sharedtr">
                                <td valign="top" class="name">
                                   <label for="shared">
                                   <a href="javascript:" id="sharedselect"><g:message code="article.shared.label" default="shared" /></a></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: articleInstance, field: 'content', 'errors')}">
<div id="selected"><g:each in="${articleInstance?.shared}" var="t">${t}<input type='hidden' name='shared' value='${t.id}'></g:each></div>
<div id="dialog-select" class="hide" title="选择共享人">
<iframe id="iframe" name="iframe" width="100%" height="100%" src="/cloud/articleAjax/sharedSelect" noresize scrolling="no"></iframe>
</div>
                                </td>
                            </tr>    
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="attachments">
                                    <a href="javascript:"  class="uploadButton"><g:message code="article.attachments.label" default="attachments" /></a></label>
                                </td>
                                <td valign="top" class="value">
                                    <div id="messages"></div>
                                    <div id="errors"></div>
                                    <div id="attachmentList">
                                    <g:each in="${articleInstance?.attachments}" var="attachment">
                         <div class='filename' id="${attachment.id}"><a href='javascript:' class='showAttachment'>${attachment.name}(${Math.round(attachment.size/1024)}k)</a>
                         <input type='hidden' name='attachments' value="${attachment.id}">
                         <a href='javascript:' class='deleteAttachment'><g:message code="default.button.delete.label" default="删除" /><g:message code="article.attachments.label" default="attachments" /></a>
                         </div>
                        
                                    </g:each>
			
                                    </div> 
                                </td>
                            </tr>

                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="content"><g:message code="article.content.label" default="Content" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: articleInstance, field: 'content', 'errors')}">
<ckeditor:config    height="300px"    width="80%"  />
<ckeditor:editor name="content" >${articleInstance?.content}</ckeditor:editor>
                                </td>
                            </tr>
                         
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </div>
            </g:form>
